<?php
/**
 * Interface for factories, that create a value converter for
 * a value.
 *
 * All factories can be put in a chain of responsibility, so
 * that they can decide themselves, whether they are able
 * to create the ValueConverter instance.
 *
 * @author  Stephan Schmidt <me@schst.net>
 */
interface ValueConverterFactory {

    /**
     * Check, whether the factory is responsible for
     * creating the ValueConverter for the definition
     *
     * @param TagDefinition $def
     * @return boolean
     */
    public function isResponsible(Definition $def);

    /**
     * Create a value converter for the definition
     *
     * @param TagDefinition $def
     * @return ValueConverter
     */
    public function createValueConverter(Definition $def);
}
?>